package com.springdemo.controller;

import com.springdemo.annotation.TestMethod;
import com.springdemo.entity.User;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/test")
public class TestController {


    @RequestMapping("")
    @ResponseBody
    @TestMethod
    public User test(){

        User user = new User();
        user.setName("1");
        return user;
    }
}
